﻿using System.ComponentModel;
using System.Configuration;
using System.Configuration.Install;
using System.ServiceProcess;

namespace JCE.ARB
{
	[RunInstaller(true)]
	public class ARBInstaller : Installer
	{
		private ServiceInstaller _arbServiceInstaller;
		private ServiceProcessInstaller _processInstaller;

		public ARBInstaller()
		{
			_processInstaller = new ServiceProcessInstaller();
			_arbServiceInstaller = new ServiceInstaller();

			_processInstaller.Account = ServiceAccount.LocalSystem;

			_arbServiceInstaller.StartType = ServiceStartMode.Manual;

			_arbServiceInstaller.ServiceName = string.Format(LocalizedStrings.ServiceName, GlobalState.InstanceName);

			Installers.Add(_arbServiceInstaller);
			Installers.Add(_processInstaller);
		}
	}
}
